﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/BMP_List.master" AutoEventWireup="true" ResponseEncoding="utf-8"
    CodeFile="Default.aspx.cs" Inherits="Pages_Equip_Installed_Default" %>

<asp:Content ID="contentHeader" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="contentSearch" ContentPlaceHolderID="contentPlaceHolderToolBar"
    runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional">
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="ddlCity"></asp:AsyncPostBackTrigger>
        </Triggers>
        <ContentTemplate>
            <asp:DropDownList ID="ddlCity" runat="server" Field="Equip_City" Width="100px" AutoPostBack="True"
                OnSelectedIndexChanged="ddlCity_SelectedIndexChanged">
            </asp:DropDownList>
            <asp:DropDownList ID="ddlDistrict" runat="server" Width="100px" Field="Equip_County">
            </asp:DropDownList>
        </ContentTemplate>
    </asp:UpdatePanel>
    安装时间
    <asp:TextBox ID="fromData" runat="server" Field="Equip_InstallDate" Opt="&#62;="
        onFocus="GetMaxDate('toData');" ClientIDMode="Static" Width="80">
    </asp:TextBox>
    至
    <asp:TextBox ID="toData" runat="server" Field="Equip_InstallDate" Opt="&#60;=" onFocus="GetMinDate('fromData');"
        ClientIDMode="Static" Width="80">
    </asp:TextBox>
    模糊查询
    <asp:TextBox runat="server" ID="txtAll" Field="Equip_SimNo,Equip_No,Equip_Town,Equip_Village"
        Opt="%" ToolTip="设备内SIM卡号，设备编号，乡，村">
    </asp:TextBox>
    每页显示
    <asp:TextBox runat="server" ID="txtPageSize" Text="20" Width="50"> </asp:TextBox>
</asp:Content>
<asp:Content ID="contentMain" ContentPlaceHolderID="contentPlaceHolder" runat="Server">
    <asp:GridView ClientIDMode="Static" ID="gvInfos" runat="server">
        <Columns>
            <asp:TemplateField ItemStyle-Width="50">
                <HeaderTemplate>
                    <input id="cbhALL" type="checkbox" onclick="SelectAll('gvInfos', this, 'cbItem');" /><label
                        for="cbhALL"></label>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:CheckBox ID="cbItem" runat="server" />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="Equip_SimNo" SortExpression="Equip_SimNo" HeaderText="设备内SIM卡号" />
            <asp:BoundField DataField="Equip_City" SortExpression="Equip_City" HeaderText="市" />
            <asp:BoundField DataField="Equip_County" SortExpression="Equip_County" HeaderText="县（区）" />
            <asp:BoundField DataField="Equip_Town" SortExpression="Equip_Town" HeaderText="乡（镇、社区）" />
            <asp:BoundField DataField="Equip_Village" SortExpression="Equip_Village" HeaderText="村（街道、单位）" />

            <asp:BoundField DataField="Ext" SortExpression="Ext" HeaderText="备注" />
            
            <asp:TemplateField HeaderText="类型" SortExpression="Equip_Class">
                <ItemTemplate>
                    <%#  GetTextByValue(DataBinder.Eval(Container.DataItem, "Equip_Class").ToString(), "Equip_Class")%>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="发送方式" SortExpression="Equip_SendMode">
                <ItemTemplate>
                    <%#  GetTextByValue(DataBinder.Eval(Container.DataItem, "Equip_SendMode").ToString(), "Equip_SendMode")%>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField SortExpression="Equip_InstallDate" HeaderText="安装时间">
                <ItemTemplate>
                    <%# Eval("Equip_InstallDate")%></ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox runat="server" ID="Equip_InstalledInfo_Equip_InstallDate" onclick="WdatePicker();"
                        Text='<%# Eval("Equip_InstallDate")%>' /></EditItemTemplate>
            </asp:TemplateField>
             <asp:BoundField DataField="EquipStatus" SortExpression="Equip_No" HeaderText="在线状态"
                ReadOnly="true" />
            <asp:CommandField ShowEditButton="true" EditText="编辑" HeaderText="编辑" ItemStyle-Width="80" />
            <asp:TemplateField HeaderText="删除" ItemStyle-Width="50">
                <ItemTemplate>
                    <asp:LinkButton ID="lbDelete" Text="删除" CausesValidation="true" CommandName="Delete"
                        OnClientClick="return confirm('确定删除吗？');" runat="server">
                    </asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:HyperLinkField HeaderText="修改" Text="修改" DataNavigateUrlFields="ManageEditURI"
                ItemStyle-Width="50" />
        </Columns>
    </asp:GridView>
</asp:Content>
